package com.zjs.entity;

import com.baomidou.mybatisplus.annotation.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zjs.common.annotation.FillFieldAnnotation;
import com.zjs.enums.FillTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;


/**
 * @author zhengJianSheng
 * &#064;create  2022-07-19 19:57
 */
@ApiModel(description = "IT设备")
@Data
@TableName("t_res_device")
@Accessors(chain = true)
public class Device {
    @ApiModelProperty(value = "设备id")
    @TableId(value = "I_ID", type = IdType.INPUT)
    private Long id;

    @ApiModelProperty(value = "录入人员ID")
    @TableField("I_CREATE_USER_ID")
    @FillFieldAnnotation(fillType = FillTypeEnum.STAFF_ID, isInsert = true)
    private Long createUserId;

    @ApiModelProperty(value = "录入人员名字")
    @TableField("S_CREATE_USER_NAME")
    @FillFieldAnnotation(fillType = FillTypeEnum.STAFF_NAME, isInsert = true)
    private String createUserName;

    @ApiModelProperty(value = "录入时间")
    @TableField("D_CREATE_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @FillFieldAnnotation(isInsert = true)
    private Date createTime;

    @ApiModelProperty(value = "更新人员ID")
    @TableField("I_UPDATE_USER_ID")
    @FillFieldAnnotation(fillType = FillTypeEnum.STAFF_ID)
    private Long updateUserId;

    @ApiModelProperty(value = "更新人员名字")
    @TableField("S_UPDATE_USER_NAME")
    @FillFieldAnnotation(fillType = FillTypeEnum.STAFF_NAME)
    private String updateUserName;

    @ApiModelProperty(value = "更新时间")
    @TableField("D_UPDATE_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @FillFieldAnnotation
    private Date updateTime;

    @ApiModelProperty(value = "逻辑删除字段")
    @TableField("I_IS_DELETE")
    @TableLogic
    private Integer isDeleted;
}

